﻿package mortal.game.view.guild.redPack
{
    import flash.events.*;
    import mortal.game.events.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;
    import mortal.mvc.core.*;

    public class RedPackActiveIcon extends ActionBaseIcon
    {
        private static var _instance:RedPackActiveIcon;

        public function RedPackActiveIcon()
        {
            super(ResFileConst.RedPackActionIcon);
            return;
        }// end function

        override protected function clickHandler(event:MouseEvent) : void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.RedPackActiveOpen));
            return;
        }// end function

        public static function get isViewShow() : Boolean
        {
            return _instance && !_instance.isHide;
        }// end function

        public static function get instance() : RedPackActiveIcon
        {
            if (!_instance)
            {
                _instance = new RedPackActiveIcon;
            }
            return _instance;
        }// end function

    }
}
